Page({
    data: {
      fontSize: 16,
      fontColor: 'black',
      fontWeight: 'normal'
    },
    changeFontSize: function () {
      let newSize = this.data.fontSize === 16 ? 20 : 16; 
      this.setData({
        fontSize: newSize
      });
      this.updateStyle();
    },
    changeFontColor: function () {
      let newColor = this.data.fontColor === 'black' ? 'red' : 'black'; 
      this.setData({
        fontColor: newColor
      });
      this.updateStyle();
    },
    changeFontWeight: function () {
      let newWeight = this.data.fontWeight === 'normal' ? 'bold' : 'normal'; 
      this.setData({
        fontWeight: newWeight
      });
      this.updateStyle();
    },
    updateStyle: function () {
      let styleString = `font-size: ${this.data.fontSize}px; color: ${this.data.fontColor}; font-weight: ${this.data.fontWeight};`;
      this.setData({
        styleString: styleString
      });
    }
  })
  